package com.project.class8_24.single;

//public class Single {
//    private static Single s = new Single();
//    private Single(){
//        System.out.println("构造方法");
//    }
//    public static Single getSingle(){
//        return s;
//    }
//}

public class Single {
    private Single(){
        System.out.println("构造方法");
    }
    private static class Inner{
        private static Single s = new Single();
    }
    public static Single getSingle(){
        return Inner.s;
    }
}
